#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QAction>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    //添加图标
    QIcon icon(":/myImages/images/fileopen.png");


   //创建新的按键动作 打开
   QAction *openAction=new QAction(icon,tr("&打开文件"),this);

   //设置快捷键
   openAction->setShortcut(QKeySequence(tr("Ctrl+0")));

   //在文件菜单中使用
   ui->menu_F->addAction(openAction);


}

MainWindow::~MainWindow()
{
    delete ui;
}
